import { Column, Entity } from 'typeorm';
import { BaseEntity } from '@app/common';

@Entity('system_menu')
export class MenuEntity extends BaseEntity {
  @Column({ type: 'bigint', name: 'parent_id' })
  parentId: string;

  @Column({ type: 'varchar', name: 'title' })
  title: string;

  @Column({ type: 'varchar', name: 'icon' })
  icon: string;

  @Column({ type: 'varchar', name: 'path' })
  path: string;

  @Column({ type: 'varchar', name: 'component' })
  component: string;

  @Column({ type: 'varchar', name: 'authority' })
  authority: string;

  @Column({ type: 'int', name: 'type' })
  type: 0 | 1 | 2;

  @Column({ type: 'int', name: 'target' })
  target: 0 | 1 | 2;

  @Column({ name: 'sort', type: 'int' })
  sort: number;

  @Column({ name: 'hide', type: 'tinyint' })
  hide: number;

  @Column({ type: 'tinyint', name: 'status' })
  status: number;
}
